{% extends "base_site.html" %}
{% load markup %}
{% load typogrify %}
{% load tagging_tags %}
{% load thumbnail %}

{% block title %} &rarr; Portfolio{% endblock %}
{% block body_class %}portfolio{% endblock %}

{% block content %}	
	{% if messages %}
		<ul class="message">
			{% for message in messages %}
				<li>{{ message }}</li>
			{% endfor %}
		</ul>
	{% endif %}

	{% for project in project_list %}
	<div class="item">
		<div class="pictures">
		{% for picture in project.picture_set.all %}
			{% if forloop.first %}
				<h3>{{ project.title|typogrify }}</h3>
				<a href="{{ project.get_absolute_url }}"><img src="{% thumbnail picture.image 200x200 crop %}" /></a>
			{% endif %}
		{% endfor %}
		</div><!-- .pictures -->
		<div class="description">
			{{ project.description|markdown|typogrify }}
		</div><!-- .description -->
		<ul class="tasks">
			{% for task in project.tasks.all %}
				<li>{{ task.title }}</li>
			{% endfor %}
		</ul><!-- .tasks -->
	</div><!-- .item -->
	{% endfor %}
{% endblock %}
